<!DOCTYPE html>
<html>
<head>
	<meta charset="utf-8">

	<title>FRBleAbility Protocol Reference</title>

	<link rel="stylesheet" href="../css/style.css">
	<meta name="viewport" content="initial-scale=1, maximum-scale=1.4">
	<meta name="generator" content="appledoc 2.2.1 (build 1334)">
</head>
<body class="appledoc">
	<header>
		<div class="container" class="hide-in-xcode">
			
			<h1 id="library-title">
				<a href="../index.html">FRQBluetoothKit </a>
			</h1>

			<p id="developer-home">
				<a href="../index.html">富芮坤微电子</a>
			</p>
			
		</div>
	</header>

	<aside>
		<div class="container">
			<nav>
				<ul id="header-buttons" role="toolbar">
					<li><a href="../index.html">Index</a></li>
<li><a href="../hierarchy.html">Hierarchy</a></li>

					<li id="on-this-page" role="navigation">
						<label>
							On This Page

							<div class="chevron">
								<div class="chevy chevron-left"></div>
								<div class="chevy chevron-right"></div>
							</div>

							<select id="jump-to">
	<option value="top">Jump To&#133;</option>
	

	
	
	<option value="tasks">Tasks</option>
	
	

	
	
	<optgroup label="Properties">
		
		<option value="//api/name/state">state</option>
		
	</optgroup>
	

	

	
	<optgroup label="Instance Methods">
		
		<option value="//api/name/allConnectedPeripherals">- allConnectedPeripherals</option>
		
		<option value="//api/name/autoReconnectToPeripheral:">- autoReconnectToPeripheral:</option>
		
		<option value="//api/name/cancelOTAUpgrade">- cancelOTAUpgrade</option>
		
		<option value="//api/name/cancelScan">- cancelScan</option>
		
		<option value="//api/name/closeAllPeripheralsConnection:">- closeAllPeripheralsConnection:</option>
		
		<option value="//api/name/closeAuotReconnectPeripheral:">- closeAuotReconnectPeripheral:</option>
		
		<option value="//api/name/closePeripheralConnection:">- closePeripheralConnection:</option>
		
		<option value="//api/name/connectToPeripheral:">- connectToPeripheral:</option>
		
		<option value="//api/name/findConnectedPeripheralWithName:">- findConnectedPeripheralWithName:</option>
		
		<option value="//api/name/isScanning">- isScanning</option>
		
		<option value="//api/name/scanPeripherals">- scanPeripherals</option>
		
		<option value="//api/name/setFilterForDiscoverPeripherals:andFilterForConnectToPeripherals:">- setFilterForDiscoverPeripherals:andFilterForConnectToPeripherals:</option>
		
		<option value="//api/name/updateOTAWithData:toPeripheral:">- updateOTAWithData:toPeripheral:</option>
		
		<option value="//api/name/updateOTAWithFilePath:toPeripheral:">- updateOTAWithFilePath:toPeripheral:</option>
		
	</optgroup>
	
	
</select>
						</label>
					</li>
				</ul>
			</nav>
		</div>
	</aside>

	<article>
		<div id="overview_contents" class="container">
			<div id="content">
				<main role="main">
					<h1 class="title">FRBleAbility Protocol Reference</h1>

					
					<div class="section section-specification"><table cellspacing="0"><tbody>
						<tr>
	<th>Conforms to</th>
	<td>NSObject</td>
</tr><tr>
	<th>Declared in</th>
	<td>FRBleAbility.h</td>
</tr>
						</tbody></table></div>
					

                    

					
					
					<div class="section section-tasks">
						<a title="Tasks" name="tasks"></a>
						

						
						

						<div class="task-list">
							<div class="section-method">
	<a name="//api/name/state" title="state"></a>
	<h3 class="method-title"><code><a href="#//api/name/state">&nbsp;&nbsp;state</a></code>
<span class="task-item-suffix">required method</span></h3>

	<div class="method-info">
		<div class="pointy-thing"></div>

		<div class="method-info-container">
			
			
			<div class="method-subsection brief-description">
				<p>当前设备状态</p>
			</div>
			
		    

			<div class="method-subsection method-declaration"><code>@property (nonatomic, assign) FRQManagerState state</code></div>

		    
			

			

			

			

			

			
			<div class="method-subsection see-also-section">
				<h4 class="method-subtitle">See Also</h4>
				<ul>
					
					<li><code><p><a href="../Constants/FRQManagerState.html">FRQManagerState</a></p></code></li>
					
				</ul>
			</div>
			

			
			<div class="method-subsection declared-in-section">
				<h4 class="method-subtitle">Declared In</h4>
				<p><code class="declared-in-ref">FRBleAbility.h</code></p>
			</div>
			
			
		</div>
	</div>
</div><div class="section-method">
	<a name="//api/name/setFilterForDiscoverPeripherals:andFilterForConnectToPeripherals:" title="setFilterForDiscoverPeripherals:andFilterForConnectToPeripherals:"></a>
	<h3 class="method-title"><code><a href="#//api/name/setFilterForDiscoverPeripherals:andFilterForConnectToPeripherals:">&ndash;&nbsp;setFilterForDiscoverPeripherals:andFilterForConnectToPeripherals:</a></code>
<span class="task-item-suffix">required method</span></h3>

	<div class="method-info">
		<div class="pointy-thing"></div>

		<div class="method-info-container">
			
			
			<div class="method-subsection brief-description">
				<p>设置查找和连接Peripherals的规则，需要在scan之前设置</p>
			</div>
			
		    

			<div class="method-subsection method-declaration"><code>- (void)setFilterForDiscoverPeripherals:(BOOL ( ^ ) ( NSString *peripheralName , NSDictionary *advertisementData , NSNumber *RSSI ))<em>discoverFilter</em> andFilterForConnectToPeripherals:(BOOL ( ^ ) ( NSString *peripheralName , NSDictionary *advertisementData , NSNumber *RSSI ))<em>connectFilter</em></code></div>

		    
			
			<div class="method-subsection arguments-section parameters">
				<h4 class="method-subtitle parameter-title">Parameters</h4>
				<table class="argument-def parameter-def">
				
					<tr>
						<th scope="row" class="argument-name"><code>discoverFilter</code></th>
						<td><p>发现蓝牙设备时过滤条件</p></td>
					</tr>
				
					<tr>
						<th scope="row" class="argument-name"><code>connectFilter</code></th>
						<td><p>连接设备时过滤条件</p></td>
					</tr>
				
				</table>
			</div>
			

			

			

			

			

			

			
			<div class="method-subsection declared-in-section">
				<h4 class="method-subtitle">Declared In</h4>
				<p><code class="declared-in-ref">FRBleAbility.h</code></p>
			</div>
			
			
		</div>
	</div>
</div><div class="section-method">
	<a name="//api/name/scanPeripherals" title="scanPeripherals"></a>
	<h3 class="method-title"><code><a href="#//api/name/scanPeripherals">&ndash;&nbsp;scanPeripherals</a></code>
<span class="task-item-suffix">required method</span></h3>

	<div class="method-info">
		<div class="pointy-thing"></div>

		<div class="method-info-container">
			
			
			<div class="method-subsection brief-description">
				<p>扫描Peripherals</p>
			</div>
			
		    

			<div class="method-subsection method-declaration"><code>- (void)scanPeripherals</code></div>

		    
			

			

			

			

			

			

			
			<div class="method-subsection declared-in-section">
				<h4 class="method-subtitle">Declared In</h4>
				<p><code class="declared-in-ref">FRBleAbility.h</code></p>
			</div>
			
			
		</div>
	</div>
</div><div class="section-method">
	<a name="//api/name/cancelScan" title="cancelScan"></a>
	<h3 class="method-title"><code><a href="#//api/name/cancelScan">&ndash;&nbsp;cancelScan</a></code>
<span class="task-item-suffix">required method</span></h3>

	<div class="method-info">
		<div class="pointy-thing"></div>

		<div class="method-info-container">
			
			
			<div class="method-subsection brief-description">
				<p>停止扫描</p>
			</div>
			
		    

			<div class="method-subsection method-declaration"><code>- (void)cancelScan</code></div>

		    
			

			

			

			

			

			

			
			<div class="method-subsection declared-in-section">
				<h4 class="method-subtitle">Declared In</h4>
				<p><code class="declared-in-ref">FRBleAbility.h</code></p>
			</div>
			
			
		</div>
	</div>
</div><div class="section-method">
	<a name="//api/name/isScanning" title="isScanning"></a>
	<h3 class="method-title"><code><a href="#//api/name/isScanning">&ndash;&nbsp;isScanning</a></code>
<span class="task-item-suffix">required method</span></h3>

	<div class="method-info">
		<div class="pointy-thing"></div>

		<div class="method-info-container">
			
			
			<div class="method-subsection brief-description">
				<p>是否正在扫描中</p>
			</div>
			
		    

			<div class="method-subsection method-declaration"><code>- (BOOL)isScanning</code></div>

		    
			

			

			

			

			

			

			
			<div class="method-subsection declared-in-section">
				<h4 class="method-subtitle">Declared In</h4>
				<p><code class="declared-in-ref">FRBleAbility.h</code></p>
			</div>
			
			
		</div>
	</div>
</div><div class="section-method">
	<a name="//api/name/connectToPeripheral:" title="connectToPeripheral:"></a>
	<h3 class="method-title"><code><a href="#//api/name/connectToPeripheral:">&ndash;&nbsp;connectToPeripheral:</a></code>
<span class="task-item-suffix">required method</span></h3>

	<div class="method-info">
		<div class="pointy-thing"></div>

		<div class="method-info-container">
			
			
			<div class="method-subsection brief-description">
				<p>连接到特定的蓝牙设备</p>
			</div>
			
		    

			<div class="method-subsection method-declaration"><code>- (void)connectToPeripheral:(CBPeripheral *)<em>peripheral</em></code></div>

		    
			
			<div class="method-subsection arguments-section parameters">
				<h4 class="method-subtitle parameter-title">Parameters</h4>
				<table class="argument-def parameter-def">
				
					<tr>
						<th scope="row" class="argument-name"><code>peripheral</code></th>
						<td><p>蓝牙设备</p></td>
					</tr>
				
				</table>
			</div>
			

			

			

			

			

			

			
			<div class="method-subsection declared-in-section">
				<h4 class="method-subtitle">Declared In</h4>
				<p><code class="declared-in-ref">FRBleAbility.h</code></p>
			</div>
			
			
		</div>
	</div>
</div><div class="section-method">
	<a name="//api/name/autoReconnectToPeripheral:" title="autoReconnectToPeripheral:"></a>
	<h3 class="method-title"><code><a href="#//api/name/autoReconnectToPeripheral:">&ndash;&nbsp;autoReconnectToPeripheral:</a></code>
<span class="task-item-suffix">required method</span></h3>

	<div class="method-info">
		<div class="pointy-thing"></div>

		<div class="method-info-container">
			
			
			<div class="method-subsection brief-description">
				<p>连接设备，支持自动重连</p>
			</div>
			
		    

			<div class="method-subsection method-declaration"><code>- (void)autoReconnectToPeripheral:(CBPeripheral *)<em>peripheral</em></code></div>

		    
			
			<div class="method-subsection arguments-section parameters">
				<h4 class="method-subtitle parameter-title">Parameters</h4>
				<table class="argument-def parameter-def">
				
					<tr>
						<th scope="row" class="argument-name"><code>peripheral</code></th>
						<td><p>蓝牙设备</p></td>
					</tr>
				
				</table>
			</div>
			

			

			

			

			

			

			
			<div class="method-subsection declared-in-section">
				<h4 class="method-subtitle">Declared In</h4>
				<p><code class="declared-in-ref">FRBleAbility.h</code></p>
			</div>
			
			
		</div>
	</div>
</div><div class="section-method">
	<a name="//api/name/closeAuotReconnectPeripheral:" title="closeAuotReconnectPeripheral:"></a>
	<h3 class="method-title"><code><a href="#//api/name/closeAuotReconnectPeripheral:">&ndash;&nbsp;closeAuotReconnectPeripheral:</a></code>
<span class="task-item-suffix">required method</span></h3>

	<div class="method-info">
		<div class="pointy-thing"></div>

		<div class="method-info-container">
			
			
			<div class="method-subsection brief-description">
				<p>断开自动重连设备</p>
			</div>
			
		    

			<div class="method-subsection method-declaration"><code>- (void)closeAuotReconnectPeripheral:(CBPeripheral *)<em>peripheral</em></code></div>

		    
			
			<div class="method-subsection arguments-section parameters">
				<h4 class="method-subtitle parameter-title">Parameters</h4>
				<table class="argument-def parameter-def">
				
					<tr>
						<th scope="row" class="argument-name"><code>peripheral</code></th>
						<td><p>蓝牙设备</p></td>
					</tr>
				
				</table>
			</div>
			

			

			

			

			

			

			
			<div class="method-subsection declared-in-section">
				<h4 class="method-subtitle">Declared In</h4>
				<p><code class="declared-in-ref">FRBleAbility.h</code></p>
			</div>
			
			
		</div>
	</div>
</div><div class="section-method">
	<a name="//api/name/closePeripheralConnection:" title="closePeripheralConnection:"></a>
	<h3 class="method-title"><code><a href="#//api/name/closePeripheralConnection:">&ndash;&nbsp;closePeripheralConnection:</a></code>
<span class="task-item-suffix">required method</span></h3>

	<div class="method-info">
		<div class="pointy-thing"></div>

		<div class="method-info-container">
			
			
			<div class="method-subsection brief-description">
				<p>断开设备连接</p>
			</div>
			
		    

			<div class="method-subsection method-declaration"><code>- (void)closePeripheralConnection:(CBPeripheral *)<em>peripheral</em></code></div>

		    
			
			<div class="method-subsection arguments-section parameters">
				<h4 class="method-subtitle parameter-title">Parameters</h4>
				<table class="argument-def parameter-def">
				
					<tr>
						<th scope="row" class="argument-name"><code>peripheral</code></th>
						<td><p>蓝牙设备</p></td>
					</tr>
				
				</table>
			</div>
			

			

			

			

			

			

			
			<div class="method-subsection declared-in-section">
				<h4 class="method-subtitle">Declared In</h4>
				<p><code class="declared-in-ref">FRBleAbility.h</code></p>
			</div>
			
			
		</div>
	</div>
</div><div class="section-method">
	<a name="//api/name/closeAllPeripheralsConnection:" title="closeAllPeripheralsConnection:"></a>
	<h3 class="method-title"><code><a href="#//api/name/closeAllPeripheralsConnection:">&ndash;&nbsp;closeAllPeripheralsConnection:</a></code>
<span class="task-item-suffix">required method</span></h3>

	<div class="method-info">
		<div class="pointy-thing"></div>

		<div class="method-info-container">
			
			
			<div class="method-subsection brief-description">
				<p>断开所有已连接的设备</p>
			</div>
			
		    

			<div class="method-subsection method-declaration"><code>- (void)closeAllPeripheralsConnection:(void ( ^ ) ( id&lt;FRBleAbility&gt; ability ))<em>block</em></code></div>

		    
			
			<div class="method-subsection arguments-section parameters">
				<h4 class="method-subtitle parameter-title">Parameters</h4>
				<table class="argument-def parameter-def">
				
					<tr>
						<th scope="row" class="argument-name"><code>block</code></th>
						<td><p>断开回调</p></td>
					</tr>
				
				</table>
			</div>
			

			

			

			

			

			

			
			<div class="method-subsection declared-in-section">
				<h4 class="method-subtitle">Declared In</h4>
				<p><code class="declared-in-ref">FRBleAbility.h</code></p>
			</div>
			
			
		</div>
	</div>
</div><div class="section-method">
	<a name="//api/name/allConnectedPeripherals" title="allConnectedPeripherals"></a>
	<h3 class="method-title"><code><a href="#//api/name/allConnectedPeripherals">&ndash;&nbsp;allConnectedPeripherals</a></code>
<span class="task-item-suffix">required method</span></h3>

	<div class="method-info">
		<div class="pointy-thing"></div>

		<div class="method-info-container">
			
			
			<div class="method-subsection brief-description">
				<p>获取当前连接的peripherals</p>
			</div>
			
		    

			<div class="method-subsection method-declaration"><code>- (NSArray *)allConnectedPeripherals</code></div>

		    
			

			
			<div class="method-subsection return">
				<h4 class="method-subtitle parameter-title">Return Value</h4>
				<p>返回所有已经连接好的设备数组</p>
			</div>
			

			

			

			

			

			
			<div class="method-subsection declared-in-section">
				<h4 class="method-subtitle">Declared In</h4>
				<p><code class="declared-in-ref">FRBleAbility.h</code></p>
			</div>
			
			
		</div>
	</div>
</div><div class="section-method">
	<a name="//api/name/findConnectedPeripheralWithName:" title="findConnectedPeripheralWithName:"></a>
	<h3 class="method-title"><code><a href="#//api/name/findConnectedPeripheralWithName:">&ndash;&nbsp;findConnectedPeripheralWithName:</a></code>
<span class="task-item-suffix">required method</span></h3>

	<div class="method-info">
		<div class="pointy-thing"></div>

		<div class="method-info-container">
			
			
			<div class="method-subsection brief-description">
				<p>获取当前连接的peripheral</p>
			</div>
			
		    

			<div class="method-subsection method-declaration"><code>- (CBPeripheral *)findConnectedPeripheralWithName:(NSString *)<em>peripheralName</em></code></div>

		    
			
			<div class="method-subsection arguments-section parameters">
				<h4 class="method-subtitle parameter-title">Parameters</h4>
				<table class="argument-def parameter-def">
				
					<tr>
						<th scope="row" class="argument-name"><code>peripheralName</code></th>
						<td><p>设备名</p></td>
					</tr>
				
				</table>
			</div>
			

			
			<div class="method-subsection return">
				<h4 class="method-subtitle parameter-title">Return Value</h4>
				<p>根据设备名获取连接的蓝牙外设</p>
			</div>
			

			

			

			

			

			
			<div class="method-subsection declared-in-section">
				<h4 class="method-subtitle">Declared In</h4>
				<p><code class="declared-in-ref">FRBleAbility.h</code></p>
			</div>
			
			
		</div>
	</div>
</div><div class="section-method">
	<a name="//api/name/updateOTAWithFilePath:toPeripheral:" title="updateOTAWithFilePath:toPeripheral:"></a>
	<h3 class="method-title"><code><a href="#//api/name/updateOTAWithFilePath:toPeripheral:">&ndash;&nbsp;updateOTAWithFilePath:toPeripheral:</a></code>
<span class="task-item-suffix">required method</span></h3>

	<div class="method-info">
		<div class="pointy-thing"></div>

		<div class="method-info-container">
			
			
			<div class="method-subsection brief-description">
				<p>通过文件路径进行OTA升级</p>
			</div>
			
		    

			<div class="method-subsection method-declaration"><code>- (void)updateOTAWithFilePath:(NSString *)<em>filePath</em> toPeripheral:(CBPeripheral *)<em>perpheral</em></code></div>

		    
			
			<div class="method-subsection arguments-section parameters">
				<h4 class="method-subtitle parameter-title">Parameters</h4>
				<table class="argument-def parameter-def">
				
					<tr>
						<th scope="row" class="argument-name"><code>filePath</code></th>
						<td><p>文件路径，app沙盒内文件路径</p></td>
					</tr>
				
					<tr>
						<th scope="row" class="argument-name"><code>perpheral</code></th>
						<td><p>蓝牙外设</p></td>
					</tr>
				
				</table>
			</div>
			

			

			

			

			

			

			
			<div class="method-subsection declared-in-section">
				<h4 class="method-subtitle">Declared In</h4>
				<p><code class="declared-in-ref">FRBleAbility.h</code></p>
			</div>
			
			
		</div>
	</div>
</div><div class="section-method">
	<a name="//api/name/updateOTAWithData:toPeripheral:" title="updateOTAWithData:toPeripheral:"></a>
	<h3 class="method-title"><code><a href="#//api/name/updateOTAWithData:toPeripheral:">&ndash;&nbsp;updateOTAWithData:toPeripheral:</a></code>
<span class="task-item-suffix">required method</span></h3>

	<div class="method-info">
		<div class="pointy-thing"></div>

		<div class="method-info-container">
			
			
			<div class="method-subsection brief-description">
				<p>通过Data进行OTA升级，会校验文件是否符合</p>
			</div>
			
		    

			<div class="method-subsection method-declaration"><code>- (void)updateOTAWithData:(NSData *)<em>binData</em> toPeripheral:(CBPeripheral *)<em>perpheral</em></code></div>

		    
			
			<div class="method-subsection arguments-section parameters">
				<h4 class="method-subtitle parameter-title">Parameters</h4>
				<table class="argument-def parameter-def">
				
					<tr>
						<th scope="row" class="argument-name"><code>binData</code></th>
						<td><p>升级文件数据</p></td>
					</tr>
				
					<tr>
						<th scope="row" class="argument-name"><code>perpheral</code></th>
						<td><p>蓝牙外设</p></td>
					</tr>
				
				</table>
			</div>
			

			

			

			

			

			

			
			<div class="method-subsection declared-in-section">
				<h4 class="method-subtitle">Declared In</h4>
				<p><code class="declared-in-ref">FRBleAbility.h</code></p>
			</div>
			
			
		</div>
	</div>
</div><div class="section-method">
	<a name="//api/name/cancelOTAUpgrade" title="cancelOTAUpgrade"></a>
	<h3 class="method-title"><code><a href="#//api/name/cancelOTAUpgrade">&ndash;&nbsp;cancelOTAUpgrade</a></code>
<span class="task-item-suffix">required method</span></h3>

	<div class="method-info">
		<div class="pointy-thing"></div>

		<div class="method-info-container">
			
			
			<div class="method-subsection brief-description">
				<p>停止升级OTA操作，如果OTA已升级完成的话无操作</p>
			</div>
			
		    

			<div class="method-subsection method-declaration"><code>- (void)cancelOTAUpgrade</code></div>

		    
			

			

			

			

			

			

			
			<div class="method-subsection declared-in-section">
				<h4 class="method-subtitle">Declared In</h4>
				<p><code class="declared-in-ref">FRBleAbility.h</code></p>
			</div>
			
			
		</div>
	</div>
</div>
						</div>
						
					</div>
					
					

                    
                    
          
				</main>

				<footer>
					<div class="footer-copyright">
						
						<p class="copyright">Copyright &copy; 2021 富芮坤微电子. All rights reserved. Updated: 2021-02-24</p>
						
						
						<p class="generator">Generated by <a href="http://appledoc.gentlebytes.com">appledoc 2.2.1 (build 1334)</a>.</p>
						
					</div>
				</footer>
			</div>
		</div>
	</article>

	<script src="../js/script.js"></script>
</body>
</html>